import java.util.Arrays;

public class Test {


    public static int[] test(){
        int[] tmp = {1,2,3,4,5};
        return tmp;
    }
    public static void main1(String[] args) {
        int[] array = test();
        System.out.println(Arrays.toString(array));
    }


    public static String myTostring(int[] array){
        String ret = "[";
        for (int i = 0; i < array.length; i++) {
            ret += array[i];
            if(i!=array.length-1){
                ret += ", ";
            }
        }
        ret += "]";
        return ret;
    }
    public static void main(String[] args) {
        //数组练习
        int[] array = {1,2,3,4,5};
        String str = myTostring(array);
        System.out.println(str);
    }
}
